package com.gzk.hrm.doc;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.math.BigDecimal;
import java.util.Date;

@Document(indexName = "hrmtest",type = "course")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CourseDoc {

    @Id
    private Long id;

    @Field(type = FieldType.Text, analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
    private String name;

    @Field(type = FieldType.Keyword)
    private String gradeName;

    @Field(type = FieldType.Keyword, index = false)
    private String forUser;

    @Field(type = FieldType.Long)
    private Long courseTypeId;

    @Field(type = FieldType.Keyword)
    private String tenantName;

    @Field(type = FieldType.Keyword, index = false)
    private String pic;

    @Field(type = FieldType.Integer)
    private Integer saleCount;

    @Field(type = FieldType.Integer)
    private Integer viewCount;

    @Field(type = FieldType.Integer)
    private Integer commentCount;

    @Field(type = FieldType.Date)
    private Date onlineTime;

    @Field(type = FieldType.Keyword,index = false)
    private String chargeName;

    @Field(type = FieldType.Double)
    private Double price;

    @Field(type = FieldType.Double)
    private Double priceOld;
}